PATHMac OS 8 Developer Documentation > Operating System Services > Multiprocessing Services >

Adding Multitasking Capability to Applications Using Multiprocessing Services

   

Checking for the Availability of Multiprocessing Services

You should always determine the availability of Multiprocessing Services before attempting to call any of its functions. If you are programming in C, you should do so by calling the Boolean macro MPLibraryIsLoaded . A return value of true indicates that the Multiprocessing Services library is present and available for use. Listing 3-1 in Creating Tasks shows an example of using the MPLibraryIsLoaded macro.

Note

For historical reasons, the Multiprocessing Services shared library may be prepared by the Code Fragment Manager and yet still be unusable; checking for resolved imported symbols is not enough to ensure that the functions are available. Therefore, you must always check for the presence of Multiprocessing Services by using the MPLibraryIsLoaded macro.

You probably want your application to run even if Multiprocessing Services is not available, so you should specify a weak link to the Multiprocessing Services shared library. Doing so allows your application to run even if the shared library is not present.


© 1999 Apple Computer, Inc. – (Last Updated 07 May 99)